package com.qzxy.premiumhotelsystem.common.constant;


import java.util.HashMap;
import java.util.Map;

/**
 * 状态常量
 */
public class RoomStatusConstant {

    public static final String AVAILABLE = "空闲";
    public static final String RESERVED = "已预订";
    public static final String OCCUPIED = "已入住";
    public static final String UNDER_MAINTENANCE = "维修中";

    // 数字和状态的映射关系
    public static final Map<Integer, String> STATUS_MAP = new HashMap<>();

    static {
        STATUS_MAP.put(1, AVAILABLE);
        STATUS_MAP.put(2, RESERVED);
        STATUS_MAP.put(3, OCCUPIED);
        STATUS_MAP.put(4, UNDER_MAINTENANCE);
    }

    // 根据数字获取状态
    public static String getStatusByNumber(Integer statusNumber) {
        return STATUS_MAP.get(statusNumber);
    }

}